<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="f"%>
<div class="J_Chart_Panel">
	<div class="h_a1" style="clear: both;">
		<span class="title">基础数据-人人推广</span>
		<div class="yjd-tip">
			<div style="width: 500px;">
				1、推广会员数：在指定的时间段内，享有0.2%推广费率的推广人（不包含分享礼包）通过人人推广拉来的推广会员数<br>
				2、推广会员首投用户数：在指定的时间段内，享有0.2%推广费率的推广人（不包含分享礼包）通过人人推广拉来的首投用户数（注册行为可以发生在指定时间段之外）<br>
				3、首投金额：在指定的时间段内，享有0.2%推广费率的推广人（不包含分享礼包）通过人人推广拉来的首投金额（注册行为可以发生在指定时间段之外）<br>
			</div>
		</div>
	</div>
	<div class="wrap">
		<form method="post" id="sumary" autocomplete="off"
			action="${requestScope.FPWEB.rootPath }/spreadRelation/summary${requestScope.FPWEB.urlStuff}">
			<div class="search_type cc">
				<label>起始时间：</label>
				<input type="input" value="${start }" class="input length_1 mr10 J_date date" name="start" min="2013-12-21" max="${now }">
				<label>截止时间：</label>
				<input type="input" value="${now }" class="input length_1 mr10 J_date date" name="end" min="2013-12-21" max="${now }">
				<button id="search" type="button" class="btn length_1">查询</button>
			</div>
		</form>
		<div id="cbox" >
			<div id="c1" class="count cc" >
				<div class="c-box" field="receiveCount">
					<div class="c-box-head" >推广会员数（人）</div>
					<div class="c-box-con">
						<span class="number" name="number">0</span> <span>人</span>
					</div>
				</div>
				<div class="c-box">
					<div class="c-box-head">推广会员首投用户数（人）</div>
					<div class="c-box-con">
						<span class="number" name="number">0</span> <span>人</span>
					</div>
				</div>
				<div class="c-box">
					<div class="c-box-head">首投金额（元）</div>
					<div class="c-box-con">
						<span class="number" name="number">0</span> <span>元</span>
					</div>
				</div>
			</div>
		</div>
	</div>
</div>
<script>
	YJD.use('AppAdminCommon');
	YJD.use('AppBICommon');
	var form=$("#sumary");
	$("#search").click(function(){
		addCompareData();
	});
	function addCompareData() {
		var d=form.serializeArray();
		var cbox=$("#c1");
		var boxes=cbox.find(".c-box");
		boxes.each(function(index,e){
			var val=$(this).find('span[name=number]');
			val.text("Loading...");
		});
		$.ajax({
			type: "post",
			url: form.attr("action"),
			data :d,
			error:function(request){
				alert("连接失败！");
			},
			success:function(data){
				if (data.state == 1) {
					boxes.each(function(index,e){
						var val=$(this).find('span[name=number]');
						val.text(data.data.summaryVals[index]);
					});
				}
			}
		});
	}
	addCompareData() ;
</script>